home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
percptrn.inh
< prev
next >
Wrap
Text File
|
1993-08-23
|
3KB
|
123 lines
inst4.1
!****************************************************************
!* *
!* Perceptron Network Generator *
!* *
!****************************************************************
! *** check that input / output PE count is non-zero
?&In 1
>bge CheckOut
@Err "Perceptron MUST have at least one input PE"
:CheckOut
?&Out 1
>bge OutOK
@Err "Perceptron MUST have at least one output PE"
:OutOK
! *** Load the Control Strategy and LRS if needed
@LdCS "percptrn" !control strategy
@LdLR "percptrn" !L/R schedule
=netn "InstaNet (tm) Perceptron Network version 1.00 20-Jun-88"
=DLnF 0 !learn re-display off
=DRcF 0 !recall re-display off
! *** Build the Input Layer ***
@LLdf !load default layer to mi_layer structure
=LDln "In" !layer name
=Lpes &In !copy # of input PEs from menu
=Ltrn "Perceptron" !transfer function
=x 100 !place to put layer on screen
=y 80
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd !add the input layer
=n0 LayN !track previous layer
=cnsc WAbs !absolute
=cnwt 1.0 !connection weight
! *** Build the Feature Demon Layer ***
?&Hd1 0 !any hidden layer?
>ble NoDmn !no demons
@LLdf !start with default layer again
=LDln "Demon" !layer name
=Lpes &Hd1 !desired number of PEs
=Ltrn "Perceptron" !transfer function
+y 80 !up higher on display
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd
! *** Connect Adaline Layer to Bias & Input Layers ***
=SPEl LayN !current layer
@SlPE !select it as destination (sb already)
=NPEl -1 !near to bias term (source)
@NrPE
=cnty WVar !variable connections
@LCFl
=cndn 0.5 !50 % connections
=NPEl n0 !input layer
@NrPE
@LCRn
=NPEl LayN !randomize these weights
@NrPE
=jogl -1.0 !randomize range
=jogh 1.0
@Lrnd !randomize them
=NPEl n0 !fix the weights between these layers
@NrPE
=cnty WFix
@LCty !connection type
=NPEl -1 !bias layer
@NrPE
@LCty
=n0 LayN !track previous layer
:NoDmn
! *** Build the output layer & connect it to prior layer ***
@LLdf !load default layer to mi_layer structure
=LDln "Out" !layer name
=Lpes &Out !copy # of input PEs from menu
=Ltrn "Perceptron" !transfer function
=Llrn "Perceptron" !learning rule
+y 80
#Incl "stdnwgtf.iif" !standard # weight fields
@LAdd !add the output layer
=SPEl LayN !output layer
@SlPE
=NPEl n0 !previous layer
@NrPE
=cnty WVar
@LCFl
=NPEl -1 !bias layer
@NrPE
@LCFl
! *** Select Control Strategy & L/R Schedule ***
@LLsl !load super layer
=Lctl "percptrn" !control strategy
=Llrs "percptrn" !L/R Schedule
=Llnn "percptrn" !name of learn input
=Lrcn "percptrn" !name of recall output
#Incl "stdioset.iif" !standard I/O settings
=Lscl -1 !input low-value
=Loff 1 !input high-value
=Llow 0 !output low-value
=Lhgh 1 !output high-value
=Lax1 Epch !epoch size
@SVsl !save it back
!
=jogl -.1 !lower limit for jog
=jogh +.1 !upper limit for jog
=seed 257 !starting seed number
@seed !set the seed
@Nrnd !randomize the network
@EOF